<?php echo $header; ?>
<div class="container">
  <div class="row">
    <div id="content" class="col-xs-12"><?php echo $content_top; ?>
      <div class="nav-bar breadcrumb"><?php echo $heading_title; ?></div>
      <?php if ($thumb || $description) { ?>
      <div class="row widget">
        <div class="col-sm-12">
          <div class="description-section">
            <?php if ($description) { ?>
            <?php if ($thumb) { ?>
            <img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" title="<?php echo $heading_title; ?>" class="thumb img-responsive" />
            <?php } ?>
            <?php echo $description; ?>
            <?php } ?>
          </div>
        </div>
      </div>
      <?php } ?>
      <?php if ($posts): ?>
      <?php foreach ($posts as $post): ?>
      <div class="row widget">
        <div class="col-sm-12">
          <div class="post-section">
            <h2><a href="<?php echo $post['href']; ?>"><?php echo $post['name']; ?></a></h2>
            <div class="row">
              <?php if ($post['thumb'] && $blog_post_image_position == 'left') { ?>
              <div class="col-sm-2">
                <a href="<?php echo $post['href']; ?>"><img src="<?php echo $post['thumb']; ?>" alt="<?php echo $post['name']; ?>" title="<?php echo $post['name']; ?>" class="img-responsive" /></a>
              </div>
              <?php } ?>
              <?php if ($post['description']) { ?>
              <div class="col-sm-<?php echo ($post['thumb'] && $blog_post_image_position == 'left') ? '10' : '12'; ?>">
                <p class="info"><i class="fa fa-calendar-check-o" aria-hidden="true"></i> <?php echo $post['date_added']; ?> <?php echo $post['author']; ?></p>
                <?php if ($post['thumb'] && $blog_post_image_position == 'top'): ?>
                <div class="thumb"><a href="<?php echo $post['href']; ?>"><img src="<?php echo $post['thumb']; ?>" alt="<?php echo $post['name']; ?>" title="<?php echo $post['name']; ?>" class="img-responsive" /></a></div>
                <?php endif ?>
                <?php echo $post['description']; ?>
                <a class="btn btn-primary" href="<?php echo $post['href']; ?>"><?php echo $button_read_more; ?></a>
              </div>
              <?php } ?>
            </div>
          </div>
        </div>
      </div>
      <?php endforeach ?>
      <?php if ($pagination): ?>
      <div class="row widget">
        <div class="col-sm-12 text-center"><?php echo $pagination; ?></div>
      </div>
      <?php endif ?>
      <?php else: ?>
      <div class="row widget">
        <p class="empty"><?php echo $text_empty; ?></p>
        <div class="buttons">
          <div class="pull-right"><a href="<?php echo $continue; ?>" class="btn btn-primary"><?php echo $button_continue; ?></a></div>
        </div>
      </div>
      <?php endif ?>
      <?php echo $content_bottom; ?>
    </div>
  </div>
</div>
<?php echo $footer; ?>
